class CreateMemberships < ActiveRecord::Migration[5.2]
  def change
    create_table :memberships do |t|
      t.string :name, comment: "会员等级名字"
      t.string :avatar, comment: "会员等级头像"
      t.integer :discount, default: 0, comment: "折扣率"
      t.decimal :price, :precision => 10, :scale => 2, :default => 0.0, comment: "售价"

      t.timestamps
    end
  end
end
